<template>
	<view class="page p12">
		
		<view class="bg-white p10 u-flex" style="box-shadow: 0px 8px 20px 0px rgba(230,219,209,0.25);">
			<image :src="info.productImage" style="width:200rpx;height: 200rpx;" mode="aspectFill"></image>
			<view class="u-f1 pl10">
				<view class="fz14 u-f-jsb u-flex" style="align-items: flex-start;">{{info.productName}}<span class="status fz12" style="min-width: 100rpx;text-align: right;">{{info.status?'已投资':'待审核'}}</span>
				</view>
				<view class="fz12 mt4 c9 u-line-1">{{info.productAddress}}</view>
				<view class="u-flex fz12 mt12">
					<span class="c6">投资金额</span>
					<span class="color-price ml6" style="color: #FBB03B;">￥{{info.investmentAmount}}</span>
				</view>
				<view class="u-flex fz12 mt5">
					<span class="c6">房源收益</span>
					<span class="color-price ml6">￥{{info.totalRevenue || 0}}</span>
				</view>
			</view>
		</view>
		<view class="bg-white mt10 p15">
			<view class=" u-flex u-f-jsb">
				<span class="status c9">投资时间</span>
				<view class="fz12 ">{{info.createTimeFormat}}</view>
			</view>
			<!-- <view class=" u-flex u-f-jsb mt12">
				<span class="status c9">投资时间</span>
				<view class="fz12 ">{{info.createTimeFormat}}</view>
			</view> -->
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: {},
				id: 1,
			}
		},
		onLoad(e) {
			if (e.id) {
				this.id = e.id
				this.getData()
			}
		},
		methods: {
			getData() {
				this.$api.investmentInfo({
					id: this.id
				}, res => {
					if (res.code) {
						this.info = res.data
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.btn {
		padding: 0 30rpx;
		height: 60rpx;
		text-align: center;
		line-height: 60rpx;
		background: rgba(242, 70, 70, 0.1);
		color: #F24646;
		border-radius: 40px;

		&.btn-del {
			background: #f5f5f5;
			color: #999;
		}
	}

	.line {
		width: 750rpx;
		height: 4rpx;
		position: relative;
		top: -4rpx;
		background: #F6F9F9;
		border-radius: 0px 0px 0px 0px;
	}

	.status1 {
		color: #E54440;
	}

	.status2 {
		color: #39959B;
	}

	.status3 {
		color: #333;
	}
</style>